<?php
require_once "db.php";
$typeAction = db_escape($_POST['typeAction']);

if($typeAction == "1"){
	$changePassForm = "<div id='ch_password_form'><form id='ch-password' method='post' action='chPassword.php'>
						<label class='ch-pass-label' for='old_pass'>Type your old password: </label><br/>
						<input type='password' id='old-pass' name='old_pass' pattern='[a-zA-Z0-9]{5,}' title='Minmimum 5 symbols(letters and numbers only).' required/><br/>
						<label class='ch-pass-label' for='new_pass1'>Type your new password: </label><br/>
						<input type='password' id='new-pass1' name='new_pass1' pattern='[a-zA-Z0-9]{5,}' title='Minmimum 5 symbols(letters and numbers only).' required/><br/>
						<label class='ch-pass-label' for='new_pass2'>Retype your new password: </label><br/>
						<input type='password' id='new-pass2' name='new_pass2' pattern='[a-zA-Z0-9]{5,}' title='Minmimum 5 symbols(letters and numbers only).' required/><br/>
						<input type='submit' name='chPassword' value='Change password'/></form></div>";
	echo $changePassForm;
}

if($typeAction == "2"){
	$changeGenres = "<div id='ch_genres_form'><form id='ch-genres' method='post' action='chGenres.php'>
					<label class='amovies'>Choose your new 3 favourite genres:</label>
					<br/>
					<label class='ch-genres-label'>1.</label>
					<select id='genre1'name='genre1'>
						<option value='action'>Action</option>
						<option value='adventure'>Adventure</option>
						<option value='animation'>Animation</option>
						<option value='biography'>Biography</option>
						<option value='comedy'>Comedy</option>
						<option value='crime'>Crime</option>
						<option value='documenraty'>Documentary</option>
						<option value='drama'>Drama</option>
						<option value='family'>Family</option>
						<option value='fantasy'>Fantasy</option>
						<option value='history'>History</option>
						<option value='horror'>Horror</option>
						<option value='musical'>Musical</option>
						<option value='mystery'>Mystery</option>
						<option value='romance'>Romance</option>
						<option value='sci-fi'>Sci-fi</option>
						<option value='thriller'>Thriller</option>
					</select>
					<br/>
					<label class='ch-genres-label'>2.</label>
					<select id='genre2'name='genre2'>
						<option value='action'>Action</option>
						<option value='adventure'>Adventure</option>
						<option value='animation'>Animation</option>
						<option value='biography'>Biography</option>
						<option value='comedy'>Comedy</option>
						<option value='crime'>Crime</option>
						<option value='documenraty'>Documentary</option>
						<option value='drama'>Drama</option>
						<option value='family'>Family</option>
						<option value='fantasy'>Fantasy</option>
						<option value='history'>History</option>
						<option value='horror'>Horror</option>
						<option value='musical'>Musical</option>
						<option value='mystery'>Mystery</option>
						<option value='romance'>Romance</option>
						<option value='sci-fi'>Sci-fi</option>
						<option value='thriller'>Thriller</option>
					</select>
					<br/>
					<label class='ch-genres-label'>3.</label>
					<select id='genre3'name='genre3'>
						<option value='action'>Action</option>
						<option value='adventure'>Adventure</option>
						<option value='animation'>Animation</option>
						<option value='biography'>Biography</option>
						<option value='comedy'>Comedy</option>
						<option value='crime'>Crime</option>
						<option value='documenraty'>Documentary</option>
						<option value='drama'>Drama</option>
						<option value='family'>Family</option>
						<option value='fantasy'>Fantasy</option>
						<option value='history'>History</option>
						<option value='horror'>Horror</option>
						<option value='musical'>Musical</option>
						<option value='mystery'>Mystery</option>
						<option value='romance'>Romance</option>
						<option value='sci-fi'>Sci-fi</option>
						<option value='thriller'>Thriller</option>
					</select>
					<br/>
					<input type='submit' name='chGenres' value='Change'/>
				</form></div>";
echo $changeGenres;
}

if($typeAction == "3"){
	$deactivateAccount = "<div id='selfdeact_account_form'><form id='selfdeact-account' method='post' action='selfDeactAccount.php'>
					<label class='selfdeact'>Warrning! If you deactivate your account, only the admin could activate it again:</label>
					<br/>
					<input type='submit' id = 'selfdeact-butt 'name='selfDeact' value='Deactivate'/>
				</form></div>";
	echo $deactivateAccount;
}


